#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* mypushbutton = new QPushButton(this);
    mypushbutton->setText("button");

    connect(mypushbutton,&QPushButton::clicked,this,&Widget::handlerclick);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::handlerclick()
{
    this->setWindowTitle("clicked");
}

